<template>
	<view style="width: 100%;height: 100%;">
		<view class="card-title">
			<view>扫码作业</view>
		</view>
		<view class="card-content" style="height: 80%;overflow: auto;">
			<text style="font-size: 14px;margin: 10rpx;" v-if="releaseOrderCode">发布工单：{{releaseOrderCode||''}}</text>
			<u-image v-if="releaseOrderImg" width="50%" height="70%" :src="releaseOrderImg"></u-image>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			currentProps: {
				typeof: Object,
				default: null
			}
		},
		name: 'ScanIssueWorkOrderCode',
		data() {
			return {
				releaseOrderImg: null,
				releaseOrderCode: ''
			}
		},
		created() {
			console.log('发布工单的二维码', this.currentProps.releaseOrderCode)
			this.releaseOrderCode = this.currentProps.releaseOrderCode
			this.getBarCode()
		},
		methods: {
			// 获取二维码
			getBarCode() {
				if (this.currentProps.releaseOrderCode && this.currentProps.releaseOrderCode != undefined) {
					this.$u.api.getBarcode(this.currentProps.releaseOrderCode).then(res => {

						this.releaseOrderImg = res.msg
					})

				}

			},
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .card-title {
		line-height: 30px;
		position: relative;
		padding-left: 20px;
		font-size: 14px;
		font-weight: 600;
		font-style: italic;
		color: #ffaa00;
		border-bottom: 1px solid #e4e7ed;
	}

	.card-content {
		// position: relative;
		display: flex;
		flex-direction: column;
		width: 100%;
		height: 100%;
		align-items: center;
		flex-direction: column;
		margin: 10px;

	}
</style>